package org.leo.test.guava.eventbus.day1;

import com.google.common.eventbus.Subscribe;
import lombok.extern.slf4j.Slf4j;

/**
 * <p>
 *
 * </p>
 *
 * @Package: org.leo.test.guava.eventbus.day1
 * @ClassName: MultipleEventListeners
 * @author: Li.Junlin
 * @date: 2019.12.16 11:20
 */
@Slf4j
public class MultipleEventListeners {
    @Subscribe
    public void task1(final String event){
        if (log.isInfoEnabled()){
            log.info("Received event [{}] and will take a action by ==task1==", event);
        }
    }

    @Subscribe
    public void task2(final String event){
        if (log.isInfoEnabled()){
            log.info("Received event [{}] and will take a action by ==task2==", event);
        }
    }

    @Subscribe
    public void intTask(final Integer event){
        if (log.isInfoEnabled()){
            log.info("Received event [{}] and will take a action by ==intTask==", event);
        }
    }
}
